// ng-radio 组件样式
.ng-radio-group {
  display: flex;
  font-size: 14px;
  line-height: 1.5;

  // 水平布局
  &.ng-radio-group--horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  // 垂直布局
  &.ng-radio-group--vertical {
    flex-direction: column;
    gap: 12px;
  }
}

.ng-radio-item {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  margin: 0;
  transition: all 0.2s ease;

  &:hover:not(.ng-radio-item--disabled) {
    .ng-radio-item__inner {
      border-color: #667eea;
    }
  }

  // 选中状态
  &.ng-radio-item--checked {
    .ng-radio-item__inner {
      border-color: #667eea;
      background-color: #667eea;

      &::after {
        transform: scale(1);
        opacity: 1;
      }
    }

    .ng-radio-item__label {
      color: #667eea;
    }
  }

  // 禁用状态
  &.ng-radio-item--disabled {
    cursor: not-allowed;
    opacity: 0.5;

    .ng-radio-item__label {
      color: #999;
    }

    .ng-radio-item__inner {
      background-color: #f5f5f5;
      border-color: #d9d9d9;
      cursor: not-allowed;
    }
  }
}

.ng-radio-item__radio {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.ng-radio-item__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  z-index: -1;
}

.ng-radio-item__inner {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #d9d9d9;
  border-radius: 50%;
  background-color: #fff;
  transition: all 0.2s ease;
  box-sizing: border-box;

  &::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #fff;
    transition: all 0.2s ease;
    opacity: 0;
  }
}

.ng-radio-item__label {
  color: #333;
  font-size: 14px;
  transition: color 0.2s ease;
}

// 响应式设计
@media (max-width: 768px) {
  .ng-radio-group.ng-radio-group--horizontal {
    gap: 12px;
  }

  .ng-radio-item__label {
    font-size: 13px;
  }
}
